﻿using ET.Monitor.DAL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ET.Monitor.Model
{
    public class FlowModel
    {
        FlowDAL dal = new FlowDAL();
        int pageCount = 0, pageIndex = 0;
        string fId = "";
        public FlowModel() { }

        public FlowModel(string id)
        {
            fId = id;
        }
        public FlowModel(int count, int page)
        {
            pageCount = count;
            pageIndex = page;
        }


        DataTable dtList;

        public DataTable DtList
        {
            get { return dal.GetFlowList(); }
            set { dtList = value; }
        }

        int flowPageCount;

        public int FlowPageCount
        {
            get { return dal.GetFlowCount(); }
            set { flowPageCount = value; }
        }

        DataTable dtFlowPage;

        public DataTable DtFlowPage
        {
            get { return dal.GetFlowPaging(pageCount, pageIndex); }
            set { dtFlowPage = value; }
        }

        bool delFlow;

        public bool DelFlow
        {
            get { return dal.delFlow(fId); }
            set { delFlow = value; }
        }
    }
}
